
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-home"></use>
                    </svg>
                    <div class="name">home</div>
                    <div class="fontclass">#icon-home</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-aligncenter"></use>
                    </svg>
                    <div class="name">align-center</div>
                    <div class="fontclass">#icon-aligncenter</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alignjustify"></use>
                    </svg>
                    <div class="name">align-justify</div>
                    <div class="fontclass">#icon-alignjustify</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alignleft"></use>
                    </svg>
                    <div class="name">align-left</div>
                    <div class="fontclass">#icon-alignleft</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-aligncenter1"></use>
                    </svg>
                    <div class="name">align-center</div>
                    <div class="fontclass">#icon-aligncenter1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alignjustify1"></use>
                    </svg>
                    <div class="name">align-justify</div>
                    <div class="fontclass">#icon-alignjustify1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alignleft1"></use>
                    </svg>
                    <div class="name">align-left</div>
                    <div class="fontclass">#icon-alignleft1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-alignright"></use>
                    </svg>
                    <div class="name">align-right</div>
                    <div class="fontclass">#icon-alignright</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-anchor"></use>
                    </svg>
                    <div class="name">anchor</div>
                    <div class="fontclass">#icon-anchor</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-blockquote"></use>
                    </svg>
                    <div class="name">blockquote</div>
                    <div class="fontclass">#icon-blockquote</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bold"></use>
                    </svg>
                    <div class="name">bold</div>
                    <div class="fontclass">#icon-bold</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-char"></use>
                    </svg>
                    <div class="name">char</div>
                    <div class="fontclass">#icon-char</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-clearformat"></use>
                    </svg>
                    <div class="name">clear-format</div>
                    <div class="fontclass">#icon-clearformat</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-code"></use>
                    </svg>
                    <div class="name">code</div>
                    <div class="fontclass">#icon-code</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-configure"></use>
                    </svg>
                    <div class="name">configure</div>
                    <div class="fontclass">#icon-configure</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-copy"></use>
                    </svg>
                    <div class="name">copy</div>
                    <div class="fontclass">#icon-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-corner"></use>
                    </svg>
                    <div class="name">corner</div>
                    <div class="fontclass">#icon-corner</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cut"></use>
                    </svg>
                    <div class="name">cut</div>
                    <div class="fontclass">#icon-cut</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-datetime"></use>
                    </svg>
                    <div class="name">datetime</div>
                    <div class="fontclass">#icon-datetime</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-explore"></use>
                    </svg>
                    <div class="name">explore</div>
                    <div class="fontclass">#icon-explore</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-find"></use>
                    </svg>
                    <div class="name">find</div>
                    <div class="fontclass">#icon-find</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fullscreen"></use>
                    </svg>
                    <div class="name">fullscreen</div>
                    <div class="fontclass">#icon-fullscreen</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-help"></use>
                    </svg>
                    <div class="name">help</div>
                    <div class="fontclass">#icon-help</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-hr"></use>
                    </svg>
                    <div class="name">hr</div>
                    <div class="fontclass">#icon-hr</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-indent"></use>
                    </svg>
                    <div class="name">indent</div>
                    <div class="fontclass">#icon-indent</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-italic"></use>
                    </svg>
                    <div class="name">italic</div>
                    <div class="fontclass">#icon-italic</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-link"></use>
                    </svg>
                    <div class="name">link</div>
                    <div class="fontclass">#icon-link</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ltr"></use>
                    </svg>
                    <div class="name">ltr</div>
                    <div class="fontclass">#icon-ltr</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-nbsp"></use>
                    </svg>
                    <div class="name">nbsp</div>
                    <div class="fontclass">#icon-nbsp</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-new"></use>
                    </svg>
                    <div class="name">new</div>
                    <div class="fontclass">#icon-new</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ok"></use>
                    </svg>
                    <div class="name">ok</div>
                    <div class="fontclass">#icon-ok</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-orderedlist"></use>
                    </svg>
                    <div class="name">ordered-list</div>
                    <div class="fontclass">#icon-orderedlist</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-outdent"></use>
                    </svg>
                    <div class="name">outdent</div>
                    <div class="fontclass">#icon-outdent</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pagebreak"></use>
                    </svg>
                    <div class="name">pagebreak</div>
                    <div class="fontclass">#icon-pagebreak</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-paragraph"></use>
                    </svg>
                    <div class="name">paragraph</div>
                    <div class="fontclass">#icon-paragraph</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-paste"></use>
                    </svg>
                    <div class="name">paste</div>
                    <div class="fontclass">#icon-paste</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pasteastext"></use>
                    </svg>
                    <div class="name">paste-as-text</div>
                    <div class="fontclass">#icon-pasteastext</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-preview"></use>
                    </svg>
                    <div class="name">preview</div>
                    <div class="fontclass">#icon-preview</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-print"></use>
                    </svg>
                    <div class="name">print</div>
                    <div class="fontclass">#icon-print</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-redo"></use>
                    </svg>
                    <div class="name">redo</div>
                    <div class="fontclass">#icon-redo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-rtl"></use>
                    </svg>
                    <div class="name">rtl</div>
                    <div class="fontclass">#icon-rtl</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-save"></use>
                    </svg>
                    <div class="name">save</div>
                    <div class="fontclass">#icon-save</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-smiley"></use>
                    </svg>
                    <div class="name">smiley</div>
                    <div class="fontclass">#icon-smiley</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-specialchar"></use>
                    </svg>
                    <div class="name">special-char</div>
                    <div class="fontclass">#icon-specialchar</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-spellcheck"></use>
                    </svg>
                    <div class="name">spell-check</div>
                    <div class="fontclass">#icon-spellcheck</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-strike"></use>
                    </svg>
                    <div class="name">strike</div>
                    <div class="fontclass">#icon-strike</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sub"></use>
                    </svg>
                    <div class="name">sub</div>
                    <div class="fontclass">#icon-sub</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sup"></use>
                    </svg>
                    <div class="name">sup</div>
                    <div class="fontclass">#icon-sup</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-table"></use>
                    </svg>
                    <div class="name">table</div>
                    <div class="fontclass">#icon-table</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-template"></use>
                    </svg>
                    <div class="name">template</div>
                    <div class="fontclass">#icon-template</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-underline"></use>
                    </svg>
                    <div class="name">underline</div>
                    <div class="fontclass">#icon-underline</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-undo"></use>
                    </svg>
                    <div class="name">undo</div>
                    <div class="fontclass">#icon-undo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-unlink"></use>
                    </svg>
                    <div class="name">unlink</div>
                    <div class="fontclass">#icon-unlink</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-unorderedlist"></use>
                    </svg>
                    <div class="name">unordered-list</div>
                    <div class="fontclass">#icon-unorderedlist</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-video"></use>
                    </svg>
                    <div class="name">video</div>
                    <div class="fontclass">#icon-video</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mark"></use>
                    </svg>
                    <div class="name">mark</div>
                    <div class="fontclass">#icon-mark</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-image"></use>
                    </svg>
                    <div class="name">image</div>
                    <div class="fontclass">#icon-image</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuhou"></use>
                    </svg>
                    <div class="name">postoperative</div>
                    <div class="fontclass">#icon-shuhou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-post-edit"></use>
                    </svg>
                    <div class="name">post-edit</div>
                    <div class="fontclass">#icon-post-edit</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
